#!/usr/bin/env bash
set -e

if [ ! -f doc-builder/build_docs ]; then
    script_dir="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
    ${script_dir}/../bin/git-fleximod update doc-builder
fi

echo "Running: make fetch-images"
make fetch-images

echo "Running: ./doc-builder/build_docs $@"
./doc-builder/build_docs "$@"

exit 0